package com.killer.auth.service.controller;

import com.killer.common.entity.Result;
import com.killer.auth.service.ISearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/search")
public class SearchController {

    @Autowired
    private ISearchService searchService;

    @RequestMapping("/goods")
    public Result searchGoods(@RequestBody Map<String, String> params) throws Exception {
        Map<String, Object> result = searchService.search(params);
        return Result.success(result);
    }

}
